package com.morningstone.bamboo.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.morningstone.report.core.annotation.ExcelColumn;
import com.morningstone.report.core.annotation.MultiColumn;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @描述 贸易商期限版导出详情模型
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class StatisticTradersToExcelDO {
    private List multiList;

    //套保编号（计划编号）
    @ExcelColumn(title = "套保编号")
    private String hedgeNO;
    //核算日期
    @JsonFormat(pattern = "yyyyMMdd", timezone = "GMT+8")
    private Date accountDate;
    //期货业务（期货
    private String futureBusinessType = "期货部分";
    //下单：保证金比例(期货)
    private Double marginRatio;
    //保证金占用(期货)
    private Double marginHold;
    //现货业务（期货）
    private String spotBusinessType = "现货部分";
    //未平仓期货(期货)
    private Double openFutures;
    //持仓均价(期货)
    private Double averagePositionPrice;
    //在手持仓盈亏(期货)期货持仓
    private Double profitOrLossFuture;
    //已平仓期货（期货）
    private Double closedPosition;
    //总实现盈亏（期货）
    private Double totalFutureLossOrProfit;
    //总盈亏（期货）
    private Double futureSumLossOrProfit;
    //总实现盈亏（现货）
    private Double totalSpotLossOrProfit;
    //总盈亏（现货）
    private Double spotSumLossOrProfit;
    //设置期货收盘价
    private Double futureClosePrice;
    //期货信息列表（期货）
    @MultiColumn(classType = FutureInfoDO.class)
    private List<FutureInfoDO> futureList;
    //期货信息列表（期货）
    // private List<OptionInfoDO> optionList;


    //套保比例（现货）
    private Double hedgeRatio;
    //现货资金占用（现货）
    private Double cashFunds;
    //未销售现货(现货)现货持仓
    private Double unSoldSpot;
    //初始均价(现货)
    private Double initialAveragePrice;
    //在手浮动盈亏(现货)
    private Double profitOrLossSpot;
    //已销售现货（现货）
    private Double soldSpot;
    //期限对冲总盈亏
    private Double spotAndFutureSumLossOrProfit;
    //现货-现价
    private Double spotNowPrice;

    private Date establishTime;

    private Integer contractSize;

    //期权（行权盈亏之和）
    private Double totalExerciseProfitLoss;

    //期权（权利金之和）
    private Double totalRoyalty;
    //期权（行权价）
    private Double exercisePrice;

    //现货信息列表（现货）
    @MultiColumn(classType = FutureInfoDO.class)
    private List<SpotInfoDO> spotInfoList;
    //计划类型
    private int planType;
    //计划发起类型(采购或销售)
    private int planInitiationType;
    //期货与现货套保比例
    private double spotFutureHedgeRation;
    //套保比例说明
    private String SpotFutureHedgeRationDes;


    //出入金列表  2021年1月20日 苏美达业务扩展要求
    // private List<OrderCapitalJournal> orderCapitalJournalList;
    //uuid 2021年1月20日 苏美达业务扩展要求
    private String uuid;

    // 现货总盈亏=销售合同上面发票价款总计之和-采购合同上面发票的价款总计之和(苏美达现货总盈亏)
    private Double spotTotalProfit;

    private String remark;


    private String sname;

    //计划基本信息-员工Id
    private Integer planEmployId;

    //统计逻辑开关
    private int logicSwitch;
    //手续费计算开关
    private int commissionSwitch;

    private String time;

    //业务员
    private String businessStaff;

    //下单、结算
    private String trader;

    //初始入金
    private Double inTradeMoney;

    //出金
    private Double outTradeMoney;

    //期货合约Id
    private String contractId;

    //现货商品种类
    private String commodityType;

    //匹配数量
    private Double matchedQuantity;

    //单位
    private String unit;

    //excel 数据冗余字段
    private String excelMargin;
    private String excelHedging;
    private String excelBusinessStaff = "业务：";
    private String excelPlace = "下单：";
    private String excelSettlement = "结算：";
    private String excelContract = "期货部分：";
    private String excelCommodity = "现货部分：";


}
